//
//  friend_func.hpp
//  learnC++
//
//  Created by apple on 2018/6/4.
//  Copyright © 2018年 yunfan.com. All rights reserved.
//

#ifndef friend_func_hpp
#define friend_func_hpp

#include <stdio.h>
#include <iostream>

class Storage2;

class Display {
private:
    bool m_displayIntFirst;
    
public:
    Display(bool displayIntFirst);
    
    void displayItem(Storage2 &storage);
    
};


class Storage2 {
private:
    int m_nValue;
    double m_dValue;
    
public:
    Storage2(int nValue,double dValue);
    
    // Make the Display class a friend of Storage
    friend void Display::displayItem(Storage2& storage);
//    friend class Display;
};



#endif /* friend_func_hpp */
